package com.itheima.d7_IO.BufferedWriter;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;

public class Test {
    public static void main(String[] args) {
        // 1, newline这个多出来的功能
        try (
                Writer fileWriter = new FileWriter("E:\\FileResource\\2.txt");
                BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);

        ) {
            bufferedWriter.write("DDD");
            bufferedWriter.newLine();
            bufferedWriter.write(98);

        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
